if (ma == "search/index") {
    $(".search_show_all_rst_foods").click(function() {
        $btn = $(this);
        var a = $(this).attr("rel");
        $(".rst_food_" + a).show();
        $btn.parent().hide();
        return false
    }); (function() {
        var a = null;
        $(".food-item").live("mouseenter",
        function() {
            var b = $(this);
            clearTimeout(a);
            a = setTimeout(function() {
                b.find(".extra-action-wrapper").show();
                b.find(".num-ratings").hide();
                if (b.hasClass("favored")) {
                    b.find(".hover-favor-food").hide();
                    b.find(".hover-un-favor-food").show()
                } else {
                    b.find(".hover-favor-food").show();
                    b.find(".hover-un-favor-food").hide()
                }
                b.find(".hover-food-link").show()
            },
            100)
        }).live("mouseleave",
        function() {
            clearTimeout(a);
            $(this).find(".num-ratings").show();
            $(this).find(".extra-action-wrapper").hide();
            $(this).find(".hover-favor-food").hide();
            $(this).find(".hover-un-favor-food").hide();
            $(this).find(".hover-food-link").hide()
        })
    })(); (function() {
        var b = get_entry_url() + "/restaurant/favoredFoods";
        var c = $(this);
        var a = c.attr("rel");
        $.getJSON(no_cache_url(b), {
            restaurant_id: a
        },
        function(d) {
            $.each(d,
            function(e, f) {
                $("#food-" + f).addClass("favored")
            })
        })
    })(); (function() {
        $(".hover-favor-food").live("click",
        function() {
            if (!login_modal_first()) {
                return false
            }
            var c = $(this);
            var d = c.attr("rel");
            var b = c.attr("rel");
            var a = get_entry_url() + "/food/favor";
            $.get(no_cache_url(a), {
                food_id: d,
                restaurant_id: b
            },
            function(e) {
                if (e >= 1) {
                    c.hide();
                    c.next().show();
                    $("#food-" + d).addClass("favored")
                }
            });
            return false
        });
        $(".hover-un-favor-food").live("click",
        function() {
            if (!login_modal_first()) {
                return false
            }
            var c = $(this);
            var d = c.attr("rel");
            var b = c.attr("rel");
            var a = get_entry_url() + "/food/unfavor";
            $.get(no_cache_url(a), {
                food_id: d,
                restaurant_id: b
            },
            function(e) {
                if (e >= 1) {
                    c.hide();
                    c.prev().show();
                    $("#food-" + d).removeClass("favored")
                }
            });
            return false
        })
    })()
};